import axios from '@/libs/api.request'
export const saveCargoTransportationInfo = (data) => { // 备案
  return axios.request({
    url: '/api/uc/truckdriverrecord/cargoTransportationService/saveCargoTransportationInfo',
    type: 'post',
    data: data
  })
}
export const getSig = (data) => { // 获取签名
  return axios.request({
    url: '/api/uc/truckdriverrecord/cargoTransportationService/getSign',
    type: 'post',
    data: data
  })
}
export const uploadBase64 = (data) => { // 上传图片
  return axios.request({
    url: '/api/uc/hdplugin/ossService/uploadBase64',
    type: 'post',
    data: data
  })
}
export const updateCargoTransportationType = (data) => { // 工作者端 核销 是否同意入沈
  return axios.request({
    url: '/api/as/truckdriverrecord/cargoTransportation/updateCargoTransportationType',
    type: 'post',
    data: data
  })
}
export const getSstUserInfo = (data) => { // 获取个人信息
  return axios.request({
    url: '/api/uc/truckdriverrecord/cargoTransportationService/getSstUserInfo',
    type: 'post',
    data: data
  })
}
export const findCarGoInfoList = (data) => { // 司机列表
  return axios.request({
    url: '/api/us/truckdriverrecord/cargoTransportation/findCarGoInfoList',
    type: 'post',
    data: data
  })
}
export const getCargoTransportationInfoByCode = (data) => { // 备案详情
  return axios.request({
    url: '/api/uc/truckdriverrecord/cargoTransportationService/getCargoTransportationInfoByCode',
    type: 'post',
    data: data
  })
}
export const getCargoTransportationInfo = (data) => { // 工作者扫码查看备案
  return axios.request({
    url: '/api/uc/truckdriverrecord/cargoTransportationService/getCargoTransportationInfoForCar',
    type: 'post',
    data: data
  })
}
export const getCargoTransportationInfoAc = (data) => { // 工作者扫码查看备案
  return axios.request({
    url: '/api/ac/truckdriverrecord/cargoTransportationService/getCargoTransportationInfo',
    type: 'post',
    data: data
  })
}
export const createIoToFile = (data) => { // 上传图片 华山
  return axios.request({
    url: '/api/uc/truckdriverrecord/cargoTransportationService/createIoToFile',
    type: 'post',
    data: data
  })
}
export const distinguishSstErCode = (data) => { // 解码
  return axios.request({
    url: '/api/ac/truckdriverrecord/cargoTransportationService/distinguishSstErCode',
    type: 'post',
    data: data
  })
}
export const getSstUserInfoForWorker = (data) => { // 判断是否有权限
  return axios.request({
    url: '/api/uc/truckdriverrecord/cargoTransportationService/getSstUserInfoForWorker',
    type: 'post',
    data: data
  })
}
// 扫码审核 后端授权接口
export const getSstCodeForWorker = (data) => { // 判断是否有权限
  return axios.request({
    url: '/api/uc/truckdriverrecord/cargoTransportationService/getSstCodeForWorker',
    type: 'post',
    data: data
  })
}
export const getSstCode = (data) => { // 登录获取用户信息
  return axios.request({
    url: '/api/uc/truckdriverrecord/cargoTransportationService/getSstCode',
    type: 'post',
    data: data
  })
}
export const getCompanyInfo = (data) => { // 车牌号改变 判断是否是返沈 入沈
  return axios.request({
    url: '/api/uc/truckdriverrecord/cargoTransportationService/getCompanyInfo',
    type: 'post',
    data: data
  })
}
export const getDisinfectionCarInfo = (data) => { // 根据车牌号查询消杀车辆信息
  return axios.request({
    url: '/api/ac/truckdriverrecord/cargoTransportationService/getDisinfectionCarInfo',
    type: 'post',
    data: data
  })
}
export const saveDisinfectionCarInfo = (data) => { // 根据车牌号填写消杀信息
  return axios.request({
    url: '/api/as/truckdriverrecord/cargoTransportation/saveDisinfectionCarInfo',
    type: 'post',
    data: data
  })
}
export const t_approve = (data) => { // 车载人员核酸信息上载
  return axios.request({
    url: '/api/ac/truckdriverrecord/cargoTransportationService/approve',
    type: 'post',
    data: data
  })
}
export const t_getHsJcJg = (data) => { // 根据身份证查询核酸
  return axios.request({
    url: '/api/ac/truckdriverrecord/GNSSServerService/getHsJcJg',
    type: 'post',
    data: data
  })
}
export const t_getHs_siji_tongxing = (data) => { // 司机和车载人员核酸信息查询
  return axios.request({
    url: '/api/ac/truckdriverrecord/GNSSServerService/getHs_siji_tongxing',
    type: 'post',
    data: data
  })
}
/**
 * 备案保存接口
 * 20220403
 * **/
export const saveCargoInfo = (data) => {
  return axios.request({
    url: '/api/uc/truckdriverrecord/cargoNewService/saveCargoInfo',
    type: 'post',
    data: data
  })
}
/**
 * 查询备案
 * 20220403
 * @param driver_cardno 身份证号
 * **/
export const getCargoTransportationInfoByCardnoForCg = (data) => {
  return axios.request({
    url: '/api/uc/truckdriverrecord/cargoNewService/getCargoTransportationInfoByCardnoForCg',
    type: 'post',
    data: data
  })
}
/**
 * 备案审核
 * 20220403
 * @param register_code 备案编号 必须传
 * **/
export const updateWorkerSh = (data) => {
  return axios.request({
    url: '/api/as/truckdriverrecord/cargonew/updateWorkerSh',
    type: 'post',
    data: data
  })
}
/**
 * 获取短信验证码
 * 20220403
 * @param phone 手机号
 * **/
export const getCode = (data) => {
  return axios.request({
    url: '/api/uc/truckdriverrecord/MIITBigDataTripService/getCode',
    type: 'post',
    data: data
  })
}
/**
 * 获取工信部行程卡验证码接口
 * 20220403
 * @param phone 手机号
 * @param verification 验证码
 * **/
export const judgeWarning = (data) => {
  return axios.request({
    url: '/api/uc/truckdriverrecord/MIITBigDataTripService/judgeWarning',
    type: 'post',
    data: data
  })
}
/**
 * 添加同行人 核验信息
 * 20220403
 * @param card_no 手机号
 * **/
export const getSstUserInfoA = (data) => {
  return axios.request({
    url: '/api/us/truckdriverrecord/cargoTransportationAll/getSstUserInfo',
    type: 'post',
    data: data
  })
}
/**
 * 收获单位新增接口
 * **/
export const insertCargoTransportationQy = (data) => {
  return axios.request({
    url: '/api/uc/truckdriverrecord/cargoTransportationAll/insertCargoTransportationQy',
    type: 'post',
    data: data
  })
}
/**
 * 收获单位查询接口
 * @param cardno 身份证号
 **/

export const getCargoTransportationQy = (data) => {
  return axios.request({
    url: '/api/uc/truckdriverrecord/cargoTransportationAll/getCargoTransportationQy',
    type: 'post',
    data: data
  })
}

/**
 * 查询企业备案信息
 * @param car_number 车牌号
 * @param driver_cardno 司机身份证
 * @param arrive_time 到沈时间
 **/

export const getQyBaInfo = (data) => {
  return axios.request({
    url: '/api/ac/truckdriverrecord/cargoNewService/getQyBaInfo',
    type: 'post',
    data: data
  })
}

/**
 * 获取菜单接口地址
 **/

export const mzMenulist = () => {
  return axios.request({
    url: `/api/ac/sc/menuService/mzMenulist?menu_id=222`,
    type: 'post'
  })
}

// 获取14天车辆轨迹
export const getVehiclePathByDate = (data) => {
  return axios.request({
    url: '/api/ac/truckdriverrecord/GNSSServerService/getVehiclePathByDate',
    type: 'post',
    data: data
  })
}

export const travelCardOCR = (data) => {
  return axios.request({
    url: '/api/ac/truckdriverrecord/recognizeTravelCardOCR/travelCardOCR',
    type: 'post',
    data: data
  })
}

/**
 * 企业备案列表
 **/

export const findQyPeopleBaList = (data) => {
  return axios.request({
    url: `/api/us/truckdriverrecord/cargonew/findQyPeopleBaList`,
    type: 'post',
    data: data
  })
}

/**
 * 企业备案列表详情
 **/

export const getQyBaByCode = (data) => {
  return axios.request({
    url: `/api/uc/truckdriverrecord/cargoNewService/getQyBaByCode`,
    type: 'post',
    data
  })
}

/**
 * 关卡
 **/

export const findgkList = (data) => {
  return axios.request({
    url: `/api/as/truckdriverrecord/cargonew/findgkList`,
    type: 'post',
    data
  })
}
